/*
 * SimpXStatus.java
 *
 * Created on 13 Январь 2011 г., 20:07
 *
 * To change this template, choose Tools | Template Manager
 * and open the template in the editor.
 */

// #sijapp cond.if modules_XSTATUSES is "true" #
package protocol;

import DrawControls.icons.Icon;
import DrawControls.icons.ImageList;
import chatty.comm.Config;
import chatty.util.ResBundle;
import chatty.modules.*;
/**
 *
 * @author Vladimir Kryukov
 */
public class XStatus {
    private static final ImageList xstatusIcons = ImageList.createImageList("/xstatus.png");
    private static final String[] xstatusNames = {
            "xstatus_none",
			"xstatus_angry",
            "xstatus_duck",
            "xstatus_tired",
            "xstatus_party",
            "xstatus_beer",
            "xstatus_thinking",
            "xstatus_eating",
            "xstatus_tv",
            "xstatus_friends",
            "xstatus_coffee",
            "xstatus_music",
            "xstatus_business",
            "xstatus_camera",
            "xstatus_funny",
            "xstatus_phone",
            "xstatus_games",
            "xstatus_college",
            "xstatus_shopping",
            "xstatus_sick",
            "xstatus_sleeping",
            "xstatus_surfing",
            "xstatus_internet",
            "xstatus_engineering",
            "xstatus_typing",
            "xstatus_unk",
            "xstatus_ppc",
            "xstatus_mobile",
            "xstatus_man",
            "xstatus_wc",
            "xstatus_question",
            "xstatus_way",
            "xstatus_heart",
            "xstatus_rambler_search",
            "xstatus_rambler_love",
            "xstatus_rambler_journal",
    };
	
    public static final XStatus noneXStatus = new XStatus((byte)0, null);
    
    private byte index;
    private String message;
    public XStatus(int xIndex, String text) {
        setStatusIndex(xIndex);
        message = text;
    }

    public Icon getIcon() {
        return xstatusIcons.iconAt(index);
    }

    public String getName() {
        return ResBundle.getString(xstatusNames[index]);
    }

    public String getMessage() {
        return message;
    }

    public static int getXStatusCount() {
        return xstatusNames.length;
    }

    public void setStatusIndex(int xIndex) {
        index = (byte)xIndex;
    }
     public void setMessage(String text) {
        message = text;
    }
	public byte getStatusIndex() {
        return index;
    }
}
// #sijapp cond.end #